home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="html" />
- <!-- main template begins -->
- <xsl:template match="/">
- <HEAD>
- <LINK REL="StyleSheet" TYPE="text/css" HREF="elib.css"></LINK>
- <TITLE>eLibPro Book Information</TITLE>
- </HEAD>
- <BODY leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
- <xsl:apply-templates />
- </BODY>
- </xsl:template>
- <!-- template for individual book begins -->
- <xsl:template match="Book">
- <xsl:variable name="BookID" select="@ID"/>
- <table border="0" cellspacing="0" cellpadding="0" width="100%" class="maintable">
- <tr>
- <td>
- <!-- book title, first table in the main table -->
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr>
- <td class="maintitle">
- <xsl:value-of select="Title" />
- <xsl:if test="Subtitle!=''">
- <xsl:text> - </xsl:text>
- <xsl:value-of select="Subtitle" />
- </xsl:if>
- <xsl:text></xsl:text>
- <xsl:if test="ReleaseDate!=''">(<xsl:value-of select="ReleaseDate" />)
- </xsl:if>
- </td>
- </tr>
- </table>
- <!-- front cover, book details and back cover, second table in the main table -->
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr>
- <xsl:if test="FrontCover!=''">
- <td class="subtitle" height="17">Front Cover</td>
- </xsl:if>
- <td class="subtitle" height="17">Book Details</td>
- <xsl:if test="BackCover!=''">
- <td class="subtitle" height="17">Back Cover</td>
- </xsl:if>
- </tr>
- <tr valign="top">
- <xsl:if test="FrontCover!=''">
- <td width="1" class="detailsbg">
- <a elibhref="elibcover://{FrontCover}">
- <img elibsrc="{FrontCover}" border="0" height="200" />
- </a>
- </td>
- </xsl:if>
- <td class="detailsbg">
- <table width="100%" border="0" cellspacing="1" cellpadding="0">
- <!-- author -->
- <xsl:if test="Author!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Author</td>
- <td class="cellvalue">
- <xsl:value-of select="Author" />
- </td>
- </tr>
- </xsl:if>
- <!-- publisher -->
- <xsl:if test="Publisher!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Publisher</td>
- <td class="cellvalue">
- <xsl:value-of select="Publisher" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="ISBN!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">ISBN</td>
- <td class="cellvalue">
- <xsl:value-of select="ISBN" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="Edition!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Edition</td>
- <td class="cellvalue">
- <xsl:apply-templates select="Edition" />
- </td>
- </tr>
- </xsl:if>
- <!-- release date -->
- <xsl:if test="ReleaseDate!=''">
- <tr valign="top" width="10%" nowrap="1">
- <td class="celllabel" width="10%" nowrap="1">Release Date</td>
- <td class="cellvalue">
- <xsl:value-of select="ReleaseDate" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="AmazonRating!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Amazon Rating</td>
- <td class="cellvalue">
- <xsl:value-of select="AmazonRating" /> <xsl:text> / 5</xsl:text>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="NumOfReviews!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Number of Reviews</td>
- <td class="cellvalue">
- <xsl:value-of select="NumOfReviews" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="MyRating!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">My Rating</td>
- <td class="cellvalue">
- <xsl:value-of select="MyRating" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="PageCount!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Number of Pages</td>
- <td class="cellvalue">
- <xsl:value-of select="PageCount" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="URL!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">URL</td>
- <td class="cellvalue">
- <a title="{URL}" href="{URL}" class="link">Web page for this book</a>
- </td>
- </tr>
- </xsl:if>
- </table>
- </td>
- <!-- end of book details -->
- <!-- back cover -->
- <xsl:if test="BackCover!=''">
- <td align="right" width="1" class="detailsbg">
- <a elibhref="elibcover://{BackCover}">
- <img elibsrc="{BackCover}" border="0" height="200" />
- </a>
- </td>
- </xsl:if>
- </tr>
- </table>
- <!-- related links -->
- <xsl:if test="Links!=''">
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr>
- <td class="subtitle">Related Links</td>
- </tr>
- <tr><td class="cellalt">
- <xsl:for-each select="Links/Link">
- <xsl:value-of select="Title" /><xsl:text>: </xsl:text>
- <a title="{Notes}" href="eliblink://{$BookID}/{@ID}" class="link"><xsl:value-of select="Path" /></a>
- <xsl:if test="position()!=last()"><br/></xsl:if>
- </xsl:for-each>
- </td></tr>
- </table>
- </xsl:if>
- <!-- categories -->
- <xsl:if test="Categories!=''">
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr>
- <td class="subtitle">Categories</td>
- </tr>
- <tr><td class="cellalt">
- <xsl:for-each select="Categories/Category">
- <b><xsl:number format=" 1. "/></b>
- <a title="Go to this category" href="elibcat://{@ID}" class="link"><xsl:value-of select="." /></a>
- <xsl:if test="position()!=last()"><br/></xsl:if>
- </xsl:for-each>
- </td></tr>
- </table>
- </xsl:if>
- <!-- personal details -->
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr>
- <td valign="top" class="detailsbg" width="50%">
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr>
- <td class="subtitle" colspan="2">Personal Details</td>
- </tr>
- <xsl:if test="Store!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Store</td>
- <td class="cellvalue">
- <xsl:value-of select="Store" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="Location!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Location</td>
- <td class="cellvalue">
- <xsl:value-of select="Location" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="PurchasePrice!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Purchase Price</td>
- <td class="cellvalue">
- <xsl:value-of select="PurchasePrice" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="PurchaseDate!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Purchase Date</td>
- <td class="cellvalue">
- <xsl:value-of select="PurchaseDate" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="Status!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Status</td>
- <td class="cellvalue">
- <xsl:value-of select="Status" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="LoanedTo!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Loan to</td>
- <td class="cellvalue">
- <xsl:value-of select="LoanedTo" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="LoanDate!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Loan Date</td>
- <td class="cellvalue">
- <xsl:value-of select="LoanDate" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="DueDate!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Due Date</td>
- <td class="cellvalue">
- <xsl:value-of select="DueDate" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="ReturnDate!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Return Date</td>
- <td class="cellvalue">
- <xsl:value-of select="ReturnDate" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="LoanNotes!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Loan Notes</td>
- <td class="cellvalue">
- <xsl:value-of select="LoanNotes" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="EbookOnly!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Only have eBook</td>
- <td class="cellvalue">
- <xsl:value-of select="EbookOnly" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="Format!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Format</td>
- <td class="cellvalue">
- <xsl:value-of select="Format" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="BookSize!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Book Size</td>
- <td class="cellvalue">
- <xsl:value-of select="BookSize" /><xsl:text> MB</xsl:text>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="CurrentPage!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Current Page</td>
- <td class="cellvalue">
- <xsl:value-of select="CurrentPage" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="UserText1!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">User Text 1</td>
- <td class="cellvalue">
- <xsl:value-of select="UserText1" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="UserText2!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">User Text 2</td>
- <td class="cellvalue">
- <xsl:value-of select="UserText2" />
- </td>
- </tr>
- </xsl:if>
- </table>
- </td>
- <!-- end personal details -->
- <!-- begin product details -->
- <td valign="top" class="detailsbg">
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr>
- <td colspan="2" class="subtitle">Product Details</td>
- </tr>
- <!-- binding -->
- <xsl:if test="Binding!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Binding</td>
- <td class="cellvalue">
- <xsl:value-of select="Binding" />
- </td>
- </tr>
- </xsl:if>
- <!-- extras -->
- <xsl:if test="Extras!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Extras</td>
- <td class="cellvalue">
- <xsl:value-of select="Extras" />
- </td>
- </tr>
- </xsl:if>
- <!-- language -->
- <xsl:if test="Language!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Language</td>
- <td class="cellvalue">
- <xsl:value-of select="Language" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="ListPrice!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">List Price</td>
- <td class="cellvalue">
- <xsl:value-of select="ListPrice" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="AmazonPrice!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Amazon Price</td>
- <td class="cellvalue">
- <xsl:value-of select="AmazonPrice" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="Dimension!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">Dimension</td>
- <td class="cellvalue">
- <xsl:value-of select="Dimension" />
- </td>
- </tr>
- </xsl:if>
- </table>
- </td>
- </tr>
- </table>
- <!-- end product details -->
- <!-- description -->
- <xsl:if test="Description!=''">
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr>
- <td class="subtitle">Description</td>
- </tr>
- <tr>
- <td class="cellalt">
- <xsl:value-of select="Description" disable-output-escaping="yes" />
- </td>
- </tr>
- </table>
- </xsl:if>
- <!-- begin notes -->
- <xsl:if test="Notes!=''">
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr>
- <td class="subtitle" align="left">Notes</td>
- </tr>
- <tr>
- <td class="cellalt">
- <xsl:value-of select="Notes" disable-output-escaping="yes" />
- </td>
- </tr>
- </table>
- </xsl:if>
- </td>
- </tr>
- </table>
- </xsl:template>
- </xsl:stylesheet>
-